<%@ page import="com.mystore.entity.User" %>
<%@ page import="java.util.Date" %>
<%@ page import="java.text.SimpleDateFormat" %><%--
  Created by IntelliJ IDEA.
  User: asus
  Date: 2017/9/19
  Time: 16:05
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <meta charset="utf-8"/>
    <title>Title</title>
    <jsp:include page="cssAndjs.jsp"/>
    <%
        //页面每隔30秒自动刷新一遍
        response.setHeader("refresh", "10");
    %>
    <style>
        .right {
            float: right;
        }
    </style>
</head>
<body>
<%
    String baseUrl = request.getContextPath();
%>
<div class="head">
    <div>
        <h3>
            欢迎你的登录:<%=((User) session.getAttribute("user")).getUsername()%>
            当前时间:<%=new SimpleDateFormat("yyyy-MM-dd hh:mm:ss").format(new Date())%>
            <a href="<%=baseUrl%>/check/kind/getAllKind">首页</a>
            <a href="<%=baseUrl%>/check/cart/getMyCart">我的购物车</a>
            <div class="right">
                <a href="<%=baseUrl%>/check/kind/loginout">退出登录</a>
            </div>
        </h3>

    </div>
</div>
</body>
</html>

